﻿#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>

typedef double Real;

typedef struct
{
	int n;
}Context;
Context context;

void read_data(Context* ctx)
{
	scanf("%d", &ctx->n);
}
 
void solve(Context* ctx)
{
	int count = 0;
	for(int y=1;y<=100;++y)
		for (int j = 1; j <= 100; ++j)
		{
			int f = 150 - y * 5 - j * 2;
			if (1 <= f && f + y + j == 100) {
				printf("%d %d %d\n", y, j, f);
				++count; 
			}
			if (count >= ctx->n)
				return;
		}
}

int main()
{
	freopen("D:/Develop/GitRepos/MOOC/浙江大学/数据结构/201906/DataStructure/M2019秋C入门和进阶练习集/7-164.txt", "r", stdin);
	read_data(&context);
	solve(&context);
	return 0;
}
